package com.xxxt.jxj.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.xxxt.dao.GradeMapper;
import com.xxxt.entity.ClassGrade;
import com.xxxt.entity.Grade;
import com.xxxt.jxj.service.GradeService;

@Service
@Transactional
public class GradeServiceImpl implements GradeService {
	@Resource
	private GradeMapper gradeMapper;
	@Override
	public List<Grade> selcetAllGradeBySpecialtyId(String specialtyId) {
		// TODO Auto-generated method stub
		return gradeMapper.selcetAllGradeBySpecialtyId(specialtyId);
	}

	@Override
	public List<Grade> selcetAllGrade() {
		// TODO Auto-generated method stub
		return gradeMapper.selcetAllGrade();
	}

	@Override
	public List<Grade> selcetAllPageGradeBySpecialtyId(String specialtyId, int pageNum, int pageSize) {
		// TODO Auto-generated method stub
		return gradeMapper.selcetAllPageGradeBySpecialtyId(specialtyId);
	}

	@Override
	public Grade selcetOneGradeByGradeId(String gradeId) {
		// TODO Auto-generated method stub
		return gradeMapper.selcetOneGradeByGradeId(gradeId);
	}

	@Override
	public boolean insertGrade(Grade grade) {
		// TODO Auto-generated method stub
		return gradeMapper.insertGrade(grade);
	}

	@Override
	public boolean deleteGrade(String gradeId) {
		// TODO Auto-generated method stub
		return gradeMapper.deleteGrade(gradeId);
	}

	@Override
	public boolean updateGrade(String gradeName, String specialtyId, String id) {
		// TODO Auto-generated method stub
		return gradeMapper.updateGrade(gradeName, specialtyId, id);
	}

	@Override
	public List<ClassGrade> selectStudentByTnoAndSpecialty(List<Grade> grades) {
		// TODO Auto-generated method stub
		return gradeMapper.selectStudentByTnoAndSpecialty(grades);
	}

}
